package com.ssy.lingxi.member.merchant.api.fallback.inner;

import com.ssy.lingxi.common.response.ResponseCode;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.member.merchant.api.feign.inner.MemberDetailFeign;
import com.ssy.lingxi.member.merchant.api.model.vo.inner.request.MemberFeignRelationVO;
import com.ssy.lingxi.member.merchant.api.model.vo.inner.request.MemberFeignSubordinateMemberVO;
import com.ssy.lingxi.member.merchant.api.model.vo.inner.request.MemberFeignUserIdVO;
import com.ssy.lingxi.member.merchant.api.model.vo.inner.response.*;
import org.springframework.stereotype.Component;

import javax.validation.Valid;
import java.util.List;

/**
 * 会员、用户信息查询内部Feign接口Fallback类
 * @author 万宁
 * @version 2.0.0
 * @date 2021-06-03
 */
@Component
public class MemberDetailFeignFallback implements MemberDetailFeign {

    /**
     * 查询用户Web端菜单权限Url列表
     * @param userIdVO 接口参数
     * @return 查询结果
     */
    @Override
    public Wrapper<List<String>> getUserWebAuthUrls(@Valid MemberFeignUserIdVO userIdVO) {
        return Wrapper.fail(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }

    /**
     * 根据会员ids查询用户
     * @param memberIds 会员id
     * @return 查询结果
     */
    @Override
    public Wrapper<List<MemberFeignMsgByMemberIdVO>> getUserByMemberIds(List<Long> memberIds) {
        return Wrapper.fail(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }

    /**
     * 根据角色id查询用户
     * @param roleIds 角色id
     * @return 查询结果
     */
    @Override
    public Wrapper<List<MemberFeignMsgByRoleIdVO>> getUserByRoleIds(List<Long> roleIds) {
        return Wrapper.fail(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }

    /**
     * 结算能力 - 查询下级会员入库分类信息中，主营品类及结算方式
     *
     * @param relationVO 接口参数
     * @return 查询结果，如无配置返回空列表
     */
    @Override
    public Wrapper<List<MemberCategoryFeignVO>> findMemberBusinessCategories(MemberFeignRelationVO relationVO) {
        return Wrapper.fail(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }

    /**
     * 根据用户Id查询用户信息
     *
     * @param idVO 接口参数
     * @return 查询结果
     */
    @Override
    public Wrapper<MemberFeignUserDetailVO> findMemberUser(MemberFeignUserIdVO idVO) {
        return Wrapper.fail(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }

    /**
     * 根据会员id和角色id，查询会员角色为服务提供者的下级会员列表
     * @param memberVO 上级会员信息
     * @return 查询结果
     */
    @Override
    public Wrapper<List<MemberManageQueryVO>> subordinateMemberList(MemberFeignSubordinateMemberVO memberVO) {
        return Wrapper.fail(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }
}
